<?php $this->view('index_view_skin1_header');?>
<script language="javascript" type="text/javascript" src="<?php echo $this->set_js('jquery.js');?>"></script>
<div class="container">
	<h2>快速注册</h2>
</div>
<div class="container">
	<div class="reg_confirm">
		<form method="post" action="<?php echo $this->set_url('user', 'reg', 'do_reg');?>">
		<ul class="reg_confirm_ul">
			<li>
				<span>
				<font color="red">*</font>用户名：
				</span>
				<span>
				<input type="text" name="username" id="username"/>
				<span style="color:red" id="username_tip"></span>
				</span>
			</li>
			<li>
				<span>
				<font color="red">*</font>昵称：
				</span>
				<span>
				<input type="text" name="nickname" id="nickname"/>
				<span style="color:red" id="nickname_tip"></span>
			</li>
			<li>
				<span>
				<font color="red">*</font>设置密码：
				</span>
				<span>
				<input type="password" name="password" id="password"/>
				<span style="color:red" id="password_tip"></span>
			</li>
			<li>
				<span>
				<font color="red">*</font>确定密码：
				</span>
				<span>
				<input type="password" name="password2" id="password2"/>
				<span style="color:red" id="password2_tip"></span>
			</li>
			<li>
				<span>
				</span>
				<span>
				<input type="submit" name="submit" value="注册" id="submit">
				</span>
			</li>
		</ul>
		</form>
	</div>
</div>
<script language="javascript" type="text/javascript">
	$(document).ready(function(){
		$("#username").blur(function(){
				check_name();
			});
	});
	//检查用户名
	function check_name()
	{
		name = $("#username").val();
		$.ajax({
			type: "POST",
			url: "<?php echo $this->set_url('user', 'reg', 'check_name');?>",
			data: "name="+name,
			success: function(msg){
				if (msg == 0)
				{
					 $("#username_tip").text('用户名已存在！');
					 $("#submit").attr('disabled', true);
				} else {
					 $("#username_tip").text('');
					 $("#submit").attr('disabled', false);
				}
			}
		 });
	 }
</script>
<!-- footer begin -->
<?php $this->view('index_view_skin1_footer');?>
<!-- footer end -->

<!-- adtv ad begin -->

<!-- ad end -->


</body>
</html>